<template>
    <div>
        <table class="mb-tb" style="width: 100%">
<#list table.fields as field>
    <#if field_index%2==0>
            <tr>
    </#if>
                <td class="mb-blue">${field.comment}</td>
                <td >{{formData.${field.propertyName}}}</td>
    <#if field_index%2==1 || table.fields?size==field_index+1>
            </tr>
    </#if>
</#list>
        </table>
    </div>
</template>

<script>
    import Base from '@/components/table/BaseView';
    export default {
        name: "MyView",
        extends:Base,
        methods:{
            loadDataById(id){
                if(id!=null){
                    this.load("/api/${cfg.projectName}/${package.ModuleName}/read",{id})
                }else{
                   this.formData={}
                }
            }
        }

    }
</script>
<style src="@/assets/css/TableView.css" scoped></style>
<style scoped >
    .mb-tb td:nth-of-type(odd){width: 10%;}
    .mb-tb td:nth-of-type(even){width: 40%}
</style>
